Skip to content

chore: improve workflows - #732

Merged
AmanVarshney01 merged 4 commits into
mainfrom
improve-workflows
Dec 17, 2025
Merged

AmanVarshney01 merged 4 commits into
mainfrom
improve-workflows

Conversation

@AmanVarshney01

@AmanVarshney01 AmanVarshney01 commented Dec 17, 2025 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Automatic PR preview publishing with preview-specific package tags and summary comments.
    • Streamlined release flow that runs gated tests and conditionally publishes releases.
  • Improvements

    • Enhanced CI test orchestration, concurrency, and timeout handling.
    • Version validation and conditional tag/release creation to prevent duplicates.
    • Added a cleanup tool and script to remove preview package tags.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel

vercel Bot commented Dec 17, 2025 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
create-better-t-stack-web Ready Ready Preview, Comment Dec 17, 2025 5:10pm

@coderabbitai

coderabbitai Bot commented Dec 17, 2025 •

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@AmanVarshney01 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 52 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 72b181a and 2a48ec9.

📒 Files selected for processing (1)
  • .github/workflows/pr-preview.yaml (1 hunks)

Walkthrough

Adds a PR preview GitHub Actions workflow that waits for tests, publishes preview NPM packages, and comments on PRs; restructures the release workflow with gated tests, semver checks, and conditional tagging/publishing; simplifies test workflow to Bun; adds a cleanup script and package script for preview dist-tags.

Changes

Cohort / File(s) Summary
PR Preview Workflow
\.github/workflows/pr-preview.yaml
New workflow triggered by a 'preview' label: polls test status for the PR head SHA, conditionally publishes preview NPM packages (computed version using base version, PR number, commit SHA), posts/updates a PR comment with install instructions, and removes label on failure.
Release Workflow
\.github/workflows/release.yaml
Reworked release flow: adds a gated Test Suite job, extracts/validates version from commit message, checks NPM for existing version, conditionally creates git tag and GitHub Release, updates package JSON versions via jq, and publishes multiple packages only when version is new. Removed canary path.
Test Workflow
\.github/workflows/test.yaml
Simplified test workflow: triggers on opened/synchronize/reopened PRs, adds concurrency, renames job to "Test Suite", switches to Bun for build/test steps, removes pnpm setup, and sets BTS_TELEMETRY=0 for CLI tests.
Package Scripts
package.json
Adds new npm script scripts.cleanup-previews pointing to bun run scripts/cleanup-previews.ts.
Cleanup Utility
scripts/cleanup-previews.ts
New script to list and remove pr< number> dist-tags across packages; supports --dry-run, --yes, and --pr=<number> flags, interactive multiselect prompt, and per-package remove/deprecate operations.

Sequence Diagram(s)

sequenceDiagram
    participant PR as Pull Request
    participant GH as GitHub Actions
    participant Checks as GitHub Checks API
    participant NPM as NPM Registry
    participant Comment as PR Comments

    PR->>GH: 'preview' label applied
    GH->>GH: Start wait-for-tests job
    loop Poll (every ~30s, up to 10min)
        GH->>Checks: Query checks for PR head SHA ("Test Suite")
        Checks-->>GH: status (queued/running/conclusion)
    end
    alt All tests conclude success
        GH->>GH: tests-passed = true
        GH->>GH: Start publish-preview job
        GH->>NPM: Compute preview versions (base + pr# + sha)
        GH->>NPM: Publish packages with tag "pr<PR number>"
        NPM-->>GH: confirm publishes
        GH->>Comment: Post or update preview summary with versions & install instructions
    else Tests fail or timeout
        GH->>GH: tests-passed = false
        GH->>Comment: Post failure message
        GH->>PR: Remove 'preview' label
    end
Loading
sequenceDiagram
    participant Dev as Dev (push)
    participant GH as GitHub Actions
    participant Workspace as CI Workspace
    participant NPM as NPM Registry
    participant Git as Git
    participant Release as GitHub Release
    participant Summary as Step Summary

    Dev->>GH: Push to main with chore(release): VERSION
    GH->>GH: Start Test Suite job
    GH->>Workspace: Checkout, setup Bun, build types, build & test CLI
    GH->>NPM: Query if VERSION exists
    alt VERSION not found
        GH->>Workspace: Update package versions via jq
        GH->>Workspace: Build packages
        GH->>NPM: Publish packages (`@types`, create-bts, `@cli`) at VERSION
        NPM-->>GH: publish confirmations
        GH->>Git: Create and push tag vVERSION
        GH->>Release: Create GitHub Release for vVERSION
        GH->>Summary: Write release summary with links
    else VERSION already exists
        GH->>Summary: Skip publishing, log existing version
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Multiple GitHub Actions with conditional flows and permissions require careful review.
  • Review areas to focus on:
    • preview version computation and tagging across packages
    • test polling logic, timeouts, and checks API usage
    • release version extraction/validation and git tag creation path
    • NPM publish/deprecate commands and error handling in the cleanup script

Possibly related PRs

Poem

🐰 I hopped in code to watch tests run,
Labels tapped 'preview' — a little fun,
Builds went out and versions grew,
Tags cleaned up by a script or two,
Bun bounds fast — previews shine like the sun!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'chore: improve workflows' is vague and generic. While it refers to workflow changes in the PR, it lacks specificity about which workflows or what improvements are made, using non-descriptive terms that don't convey meaningful information. Use a more specific title that describes the main workflow improvements, such as 'chore: add PR preview workflow and enhance CI/CD' or 'chore: add preview publishing and release validation workflows'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
scripts/cleanup-previews.ts (2)

6-8: Use type alias instead of interface.

Per coding guidelines, prefer TypeScript type aliases over interface declarations.

-interface DistTags {
-	[tag: string]: string;
-}
+type DistTags = {
+	[tag: string]: string;
+};

49-51: Consider logging the actual error for debugging purposes.

The catch block swallows the error details. While the warning message is helpful, logging the error would aid debugging when tag fetching fails unexpectedly.

 		} catch (err) {
-			console.warn(`Failed to fetch tags for ${pkg}`);
+			console.warn(`Failed to fetch tags for ${pkg}:`, err instanceof Error ? err.message : err);
 		}
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3d95a04 and 3cb1c8f.

📒 Files selected for processing (5)
  • .github/workflows/pr-preview.yaml (1 hunks)
  • .github/workflows/release.yaml (2 hunks)
  • .github/workflows/test.yaml (1 hunks)
  • package.json (1 hunks)
  • scripts/cleanup-previews.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/better-t-stack-repo.mdc)

Define functions using the standard function declaration syntax, not arrow functions

Files:

  • scripts/cleanup-previews.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/better-t-stack-repo.mdc)

**/*.{ts,tsx}: Use TypeScript type aliases instead of interface declarations
Do not use explicit return types

Files:

  • scripts/cleanup-previews.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

**/*.{ts,tsx,js,jsx}: Use bun <file> instead of node <file> or ts-node <file> for running TypeScript/JavaScript files
Bun automatically loads .env files, so don't use the dotenv package
Use Bun.serve() which supports WebSockets, HTTPS, and routes instead of express
Use bun:sqlite module for SQLite instead of better-sqlite3
Use Bun.redis for Redis instead of ioredis
Use Bun.sql for Postgres instead of pg or postgres.js
Use built-in WebSocket instead of the ws package
Prefer Bun.file over node:fs readFile/writeFile methods
Use Bun.$ template literal syntax instead of execa for shell command execution
Import .css files directly in TypeScript/JavaScript files; Bun's CSS bundler will handle bundling
Run server with bun --hot <file> to enable hot reloading during development

Files:

  • scripts/cleanup-previews.ts
**/*.{ts,tsx,js,jsx,css}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use bun build <file> instead of webpack or esbuild for bundling TypeScript, JavaScript, and CSS files

Files:

  • scripts/cleanup-previews.ts
**/*.{html,tsx,ts,jsx,js}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use HTML imports with Bun.serve() for frontend instead of Vite

Files:

  • scripts/cleanup-previews.ts
package.json

📄 CodeRabbit inference engine (.cursor/rules/convex_rules.mdc)

Always add @types/node to your package.json when using any Node.js built-in modules

Use bun run <script> instead of npm run <script>, yarn run <script>, or pnpm run <script>

Files:

  • package.json
{package.json,bun.lockb}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use bun install instead of npm install, yarn install, or pnpm install

Files:

  • package.json
🧠 Learnings (10)
📚 Learning: 2025-12-03T07:48:26.419Z
Learnt from: CR
Repo: AmanVarshney01/create-better-t-stack PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-12-03T07:48:26.419Z
Learning: Applies to package.json : Use `bun run <script>` instead of `npm run <script>`, `yarn run <script>`, or `pnpm run <script>`

Applied to files:

  • package.json
📚 Learning: 2025-12-03T07:48:26.419Z
Learnt from: CR
Repo: AmanVarshney01/create-better-t-stack PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-12-03T07:48:26.419Z
Learning: Applies to {package.json,bun.lockb} : Use `bun install` instead of `npm install`, `yarn install`, or `pnpm install`

Applied to files:

  • package.json
📚 Learning: 2025-12-03T07:48:26.419Z
Learnt from: CR
Repo: AmanVarshney01/create-better-t-stack PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-12-03T07:48:26.419Z
Learning: Applies to **/*.{ts,tsx,js,jsx,css} : Use `bun build <file>` instead of `webpack` or `esbuild` for bundling TypeScript, JavaScript, and CSS files

Applied to files:

  • package.json
📚 Learning: 2025-12-03T07:48:26.419Z
Learnt from: CR
Repo: AmanVarshney01/create-better-t-stack PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-12-03T07:48:26.419Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use `bun <file>` instead of `node <file>` or `ts-node <file>` for running TypeScript/JavaScript files

Applied to files:

  • package.json
📚 Learning: 2025-12-03T07:48:26.419Z
Learnt from: CR
Repo: AmanVarshney01/create-better-t-stack PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-12-03T07:48:26.419Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Use `bun test` instead of `jest` or `vitest` for running tests

Applied to files:

  • package.json
📚 Learning: 2025-12-03T07:48:26.419Z
Learnt from: CR
Repo: AmanVarshney01/create-better-t-stack PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-12-03T07:48:26.419Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use `Bun.$` template literal syntax instead of `execa` for shell command execution

Applied to files:

  • package.json
📚 Learning: 2025-12-03T07:48:26.419Z
Learnt from: CR
Repo: AmanVarshney01/create-better-t-stack PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-12-03T07:48:26.419Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Run server with `bun --hot <file>` to enable hot reloading during development

Applied to files:

  • package.json
📚 Learning: 2025-12-03T07:48:26.419Z
Learnt from: CR
Repo: AmanVarshney01/create-better-t-stack PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-12-03T07:48:26.419Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Use `bun:test` module with `test` and `expect` functions for writing tests

Applied to files:

  • package.json
📚 Learning: 2025-12-03T07:48:26.419Z
Learnt from: CR
Repo: AmanVarshney01/create-better-t-stack PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-12-03T07:48:26.419Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use `bun:sqlite` module for SQLite instead of `better-sqlite3`

Applied to files:

  • package.json
📚 Learning: 2025-12-03T07:48:26.419Z
Learnt from: CR
Repo: AmanVarshney01/create-better-t-stack PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-12-03T07:48:26.419Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use `Bun.sql` for Postgres instead of `pg` or `postgres.js`

Applied to files:

  • package.json
🔇 Additional comments (13)
.github/workflows/test.yaml (2)

10-12: Well-structured concurrency configuration.

The concurrency group using github.head_ref || github.ref correctly handles both PR and push events, preventing redundant test runs when new commits are pushed.


40-45: Simplified build and test step looks good.

Combining the build and test into a single CLI-focused step (bun run build && bun run test:ci) streamlines the workflow. The AGENT: 1 and BTS_TELEMETRY: 0 environment variables are correctly set.

scripts/cleanup-previews.ts (1)

116-156: Cleanup logic is well-structured with appropriate error handling.

The cleanupPR function correctly handles dry-run mode, gracefully handles missing versions, and provides clear status output for each package. The per-operation try-catch blocks ensure one failure doesn't stop cleanup of other packages.

.github/workflows/release.yaml (4)

13-15: Correct concurrency strategy for releases.

Setting cancel-in-progress: false prevents partial releases by ensuring in-progress release jobs complete before new ones start.


75-81: Good version format validation.

The semver regex validation prevents malformed versions from being published. This is a useful safeguard.


83-93: Idempotency check prevents duplicate releases.

Checking if the version already exists on NPM before proceeding prevents accidental republishing and makes the workflow idempotent.


149-154: Verify the caret prefix for types dependency is intentional.

The types dependency uses ^$VERSION (caret range), while the create-bts package on line 168 uses the same pattern. This allows minor version updates, which may be intentional for flexibility, but differs from how preview versions pin exact versions.

package.json (1)

19-19: Script entry follows established conventions.

The new cleanup-previews script correctly uses bun run to execute the TypeScript file, consistent with other scripts in this monorepo and the coding guidelines.

.github/workflows/pr-preview.yaml (5)

3-5: Security note: pull_request_target with PR code checkout.

Using pull_request_target with checkout of github.event.pull_request.head.sha (line 89) allows publishing previews from fork PRs. This is the correct pattern, but ensure the NPM_TOKEN secret has appropriate scope limitations since this workflow can execute code from external contributors.

The preview label requirement (line 20) provides a manual gate, which is good. Consider documenting this security model for maintainers.


34-37: Polling configuration is reasonable.

60 attempts × 10 seconds = 10 minutes timeout. This should be sufficient for most test runs given the 15-minute timeout in the test workflow.


102-117: Preview version generation is well-designed.

The version format {BASE_VERSION}-pr{PR_NUMBER}.{COMMIT_SHA} provides traceability to both the PR and specific commit, and the pr{NUMBER} tag allows easy installation of the latest preview for a given PR.


133-136: Pinning types dependency to exact preview version.

Unlike the release workflow (which uses ^$VERSION), the preview workflow pins the types dependency to the exact preview version. This is appropriate for previews where all packages should use the same preview build.


241-254: Good practice: Automatic label removal on failure.

Removing the preview label when tests fail provides clear feedback and prevents confusion about preview status. The try-catch handles the case where the label was already removed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/release.yaml (1)

29-32: Consider Git user configuration consistency.

The test job uses github-actions[bot] credentials (lines 30-32), while tag creation uses personal credentials (lines 96-97). This inconsistency might cause confusion in Git history.

For consistency, consider using the same Git user throughout:

           VERSION="${{ steps.version.outputs.version }}"
-          git config --local user.email "amanvarshney.work@gmail.com"
-          git config --local user.name "Aman Varshney"
+          git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
+          git config --local user.name "github-actions[bot]"

Also applies to: 96-97

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3cb1c8f and 72b181a.

📒 Files selected for processing (2)
  • .github/workflows/release.yaml (2 hunks)
  • .github/workflows/test.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/test.yaml
🔇 Additional comments (5)
.github/workflows/release.yaml (5)

3-15: LGTM! Appropriate trigger and concurrency configuration.

The push-to-main trigger and concurrency settings are well-suited for a release workflow, preventing concurrent releases while allowing multiple PRs to queue.


92-103: Verify error handling for tag creation.

The tag creation includes a defensive check for tag existence, but there's no explicit error handling if git push --tags fails (e.g., due to network issues or permission problems).

Is it acceptable for the workflow to fail silently if tag pushing fails, or should there be explicit error handling and notification?


160-165: LGTM! create-bts package version update is correct.

The jq command properly updates both the package version and the dependency on create-better-t-stack, ensuring consistency.


183-195: LGTM! Well-formatted release summary.

The release summary provides clear links to all published packages and the GitHub release, making it easy to verify the release.


18-22: This review concern is unfounded. Tests run on all commits to main through the separate test.yaml workflow, which triggers unconditionally on pushes to main. The release.yaml workflow is intentionally specialized for release commits only (those starting with chore(release):), providing proper separation of concerns. Non-release commits skip the release workflow's test job by design, not by oversight, since they're already tested by the dedicated CI workflow.

Comment on lines +72 to +79
- name: Validate version format
run: |
VERSION="${{ steps.version.outputs.version }}"
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: Invalid version format '$VERSION'. Expected semver (x.y.z)"
exit 1
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Semver validation doesn't support pre-release versions.

The regex ^[0-9]+\.[0-9]+\.[0-9]+$ only validates basic semver format (x.y.z) and will reject pre-release versions like 1.0.0-beta.1 or versions with build metadata.

If pre-release versions are needed in the future, update the regex to:

-          if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+          if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$ ]]; then
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Validate version format
run: |
VERSION="${{ steps.version.outputs.version }}"
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: Invalid version format '$VERSION'. Expected semver (x.y.z)"
exit 1
fi
- name: Validate version format
run: |
VERSION="${{ steps.version.outputs.version }}"
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$ ]]; then
echo "Error: Invalid version format '$VERSION'. Expected semver (x.y.z)"
exit 1
fi
🤖 Prompt for AI Agents
In .github/workflows/release.yaml around lines 72-79, the current regex only
allows x.y.z and will reject valid semver pre-release and build metadata (e.g.,
1.0.0-beta.1); replace the simple regex check with a proper semver-aware
validation—either swap the pattern for a full semver-spec-compliant regex
(allowing optional prerelease and build metadata) or call a semantic versioning
validator (e.g., the well-known semver library) to validate VERSION so
pre-release and build metadata versions are accepted.

Comment on lines +146 to +151
- name: Update CLI types dependency and version
if: steps.check-version.outputs.exists == 'false'
run: |
VERSION=${{ steps.version.outputs.version }}
VERSION="${{ steps.version.outputs.version }}"
cd apps/cli
bun run node -e "const pkg=require('./package.json');pkg.dependencies['@better-t-stack/types']='^$VERSION';require('fs').writeFileSync('package.json',JSON.stringify(pkg,null,2)+'\n')"
jq --arg v "^$VERSION" '.dependencies["@better-t-stack/types"] = $v' package.json > tmp.json && mv tmp.json package.json

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical: CLI package version is never updated before publishing.

The step name claims to update both "CLI types dependency and version", but the jq command only updates the types dependency. The CLI's own version field in apps/cli/package.json is never set to $VERSION before publishing at line 169.

Apply this diff to fix the CLI version update:

       - name: Update CLI types dependency and version
         if: steps.check-version.outputs.exists == 'false'
         run: |
           VERSION="${{ steps.version.outputs.version }}"
           cd apps/cli
-          jq --arg v "^$VERSION" '.dependencies["@better-t-stack/types"] = $v' package.json > tmp.json && mv tmp.json package.json
+          jq --arg v "$VERSION" --arg dep "^$VERSION" '.version = $v | .dependencies["@better-t-stack/types"] = $dep' package.json > tmp.json && mv tmp.json package.json
🤖 Prompt for AI Agents
.github/workflows/release.yaml around lines 146 to 151: the workflow only
updates the @better-t-stack/types dependency in apps/cli/package.json but never
sets the CLI package's own "version" field to the release $VERSION; modify the
step to set both .version and .dependencies["@better-t-stack/types"] using jq
(assign .version = $VERSION and update the dependency) and write the output to a
tmp.json then mv tmp.json package.json so the CLI package.json contains the
correct version before publishing.

@AmanVarshney01
AmanVarshney01 merged commit 51fc871 into main Dec 17, 2025
3 of 4 checks passed
@AmanVarshney01
AmanVarshney01 deleted the improve-workflows branch December 17, 2025 17:10

This branch was successfully deployed

1 active deployment
Preview — 2a48ec96 Deployed Dec 17, 2025 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant